/*     */ package me.wazup.kitbattle;
/*     */ 
/*     */ import java.util.ArrayList;
/*     */ import java.util.Collection;
/*     */ import java.util.List;
/*     */ import org.bukkit.ChatColor;
/*     */ import org.bukkit.entity.Player;
/*     */ import org.bukkit.inventory.ItemStack;
/*     */ import org.bukkit.inventory.meta.ItemMeta;
/*     */ import org.bukkit.potion.PotionEffect;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class Kit
/*     */ {
/*     */   private ItemStack logo;
/*     */   private ItemStack shopLogo;
/*     */   private ItemStack[] items;
/*     */   private ItemStack[] armor;
/*     */   Collection<PotionEffect> effects;
/*     */   ArrayList<Ability> abilities;
/*     */   boolean enabled;
/*     */   boolean requirePermission;
/*     */   private int Price;
/*     */   String name;
/*     */   String permission;
/*     */   
/*     */   public Kit(String name, ItemStack logo, ItemStack[] items, ItemStack[] armor, int Price, Collection<PotionEffect> effects, ArrayList<Ability> abilities, boolean Enabled, boolean requirePermission) {
/*  31 */     this.logo = logo;
/*     */ 
/*     */     
/*  34 */     ItemMeta logoMeta = logo.getItemMeta();
/*  35 */     List<String> logoLores = new ArrayList<String>();
/*  36 */     if (logoMeta.getLore() != null) logoLores = logoMeta.getLore(); 
/*  37 */     logoLores.add(" ");
/*  38 */     logoLores.add(ChatColor.BLUE + "State: " + (Enabled ? (ChatColor.GREEN + "Enabled") : (ChatColor.RED + "Disabled")));
/*  39 */     logoLores.add(ChatColor.BLUE + "Requires Permission: " + (requirePermission ? (ChatColor.RED + "Yes") : (ChatColor.GREEN + "No")));
/*  40 */     logoMeta.setLore(logoLores);
/*  41 */     logo.setItemMeta(logoMeta);
/*     */ 
/*     */     
/*  44 */     this.shopLogo = logo.clone();
/*  45 */     ItemMeta meta = this.shopLogo.getItemMeta();
/*  46 */     meta.setDisplayName(ChatColor.LIGHT_PURPLE + name);
/*  47 */     List<String> lores = new ArrayList<String>();
/*  48 */     if (meta.getLore() != null) lores = meta.getLore(); 
/*  49 */     lores.add(" ");
/*  50 */     lores.add(ChatColor.GOLD + "Price: " + ChatColor.YELLOW + Price + ChatColor.GOLD + " coins!");
/*  51 */     meta.setLore(lores);
/*  52 */     this.shopLogo.setItemMeta(meta);
/*     */     
/*  54 */     this.items = items;
/*  55 */     this.armor = armor;
/*  56 */     this.Price = Price;
/*  57 */     this.name = name;
/*  58 */     this.effects = effects;
/*  59 */     this.abilities = abilities;
/*  60 */     this.enabled = Enabled;
/*  61 */     this.requirePermission = requirePermission;
/*  62 */     this.permission = "kitbattle.kits." + name;
/*     */   }
/*     */ 
/*     */   
/*  66 */   public ItemStack getLogo() { return this.logo; }
/*     */ 
/*     */ 
/*     */   
/*  70 */   public ItemStack getShopLogo() { return this.shopLogo; }
/*     */ 
/*     */ 
/*     */   
/*  74 */   public boolean isEnabled() { return this.enabled; }
/*     */ 
/*     */ 
/*     */   
/*  78 */   public String getName() { return this.name; }
/*     */ 
/*     */ 
/*     */   
/*  82 */   public void setName(String name) { this.name = name; }
/*     */ 
/*     */ 
/*     */   
/*  86 */   public ItemStack[] getItems() { return this.items; }
/*     */ 
/*     */ 
/*     */   
/*  90 */   public ItemStack[] getArmor() { return this.armor; }
/*     */ 
/*     */ 
/*     */   
/*  94 */   public ArrayList<Ability> getAbilities() { return this.abilities; }
/*     */ 
/*     */   
/*     */   public void giveItems(Player p) {
/*  98 */     p.getInventory().setContents(this.items);
/*  99 */     p.getInventory().setArmorContents(this.armor);
/* 100 */     p.addPotionEffects(this.effects);
/*     */   }
/*     */ 
/*     */   
/* 104 */   public int getPrice() { return this.Price; }
/*     */ }


/* Location:              C:\Users\韩烨均\Documents\Tencent Files\133280410\FileRecv\KitBattle.jar!\me\wazup\kitbattle\Kit.class
 * Java compiler version: 5 (49.0)
 * JD-Core Version:       1.1.2
 */